package com.example.web.swagger;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.Map;

@Tag(name = "认证接口")
public interface ILoginController {

    @Operation(summary = "获取用户信息（示例一）", description = "根据id在取用户信息")
    @GetMapping(path = "/login1",
            produces = MediaType.APPLICATION_JSON_VALUE
    )
    public Map<String, Object> login1(String username, String password);

    @Operation(summary = "获取用户信息（示例二）", description = "根据id在取用户信息")
    @PostMapping(path = "/login2",
            consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE
    )
    public Map<String, Object> login2(String username, String password);

}
